#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <vector>

using namespace std;

struct ListNode {
    int val;
    ListNode* next;
    ListNode(int x) : val(x), next(NULL) {}
};

struct TreeNode {
    int val;
    TreeNode* left;
    TreeNode* right;
    TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};

class Solution {
   private:
    bool isChild(TreeNode* root, TreeNode* child) {
        if (child == NULL) return true;
        if (root == NULL) return false;
        return root->val == child->val ? isChild(root->left, child->left) && isChild(root->right, child->right) : false;
    }

   public:
    bool isSubStructure(TreeNode* A, TreeNode* B) {
        if (A == NULL || B == NULL) return false;
        return isChild(A, B) || isSubStructure(A->left, B) || isSubStructure(A->right, B);
    }
};

int main() {
    cout << "Hello, World!";
    return 0;
}